package org.dydl.service.system;

import org.dydl.common.dto.ResponseMessage;
import org.dydl.model.system.MaterialsPurchase;
import org.dydl.model.system.MaterialsPurchaseDetail;
import org.dydl.model.system.vo.PurchaseOrderVo;

import java.util.List;

public interface MaterialsPurchaseService {

	/**
	 * 
	 * @param page
	 * @param rows
	 * @param purchaseSingleNo
	 * @return
	 */
	ResponseMessage list(int page, int rows, String purchaseSingleNo);

	/**
	 * 保存
	 * @param materialsPurchase
	 * @return
	 */
	ResponseMessage save(MaterialsPurchase materialsPurchase);

	/**
	 * 删除
	 * @param id
	 */
	void delete(int id);

	/**
	 * 根据采购单号查询原料采购单
	 * @param purchaseSingleNo
	 * @return
	 */
	MaterialsPurchase findByPurchaseSingleNo(String purchaseSingleNo);

	/**
	 * 根据采购单号查询采购单明细列表
	 * @param findDetailByPurchaseSingleNo
	 * @return
	 */
	List<MaterialsPurchaseDetail> findDetailByPurchaseSingleNo(String findDetailByPurchaseSingleNo);

	/**
	 * 保存明细列表
	 * @param grid_arr
	 */
	void saveDetail(List<MaterialsPurchaseDetail> grid_arr);

	/**
	 * 新增采购单
	 * @param purchaseOrderVo
	 * @return
	 */
	ResponseMessage savePurchaseOrder(PurchaseOrderVo purchaseOrderVo);
	
	/**
	 * 根据采购单号删除原料
	 * @param purchaseSingleNo
	 */
	void deleteDetail(String purchaseSingleNo);
	
	/**
	 * 审核
	 * @param ids
	 * @param status
	 */
	void changeExamine(Integer ids,Integer status);

	/**
	 * 到货确认接口 采购单号修改采购单中的状态并且查询 采购明细数据对商品资料数据核增
	 * @param purchaseSingleNos 采购单号数组
	 * @return
	 */
	ResponseMessage affirmMaterisals(String[] purchaseSingleNos);


}
